/**
 * @author brianxia
 * @version 1.0
 * @date 2021/10/6 16:29
 */
public class PrintException {

    public static void test1() throws Exception {
        throw new Exception("test1...");
    }

    public static void test2() throws Exception {
        try {
            test1();
        } catch (Exception e) {
            throw new Exception("test2...",e);
        }
    }
    public static void test3() throws Exception {
        try {
            test2();
        } catch (Exception e) {
            throw new Exception("test3...",e);
        }
    }

    public static void main(String[] args) {
        try {
            test3();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
